#import "soundboard.h"
#include <iostream>

SoundBoard::SoundBoard(){
    Mix_OpenAudio( 44100, MIX_DEFAULT_FORMAT, 2, 2048 );
    dash = Mix_LoadWAV( "sound/dash.wav" );
    gravity = Mix_LoadWAV("sound/gravity.wav" );
}
SoundBoard::~SoundBoard(){
    if(dash!=NULL)
    	Mix_FreeChunk( dash );
    Mix_CloseAudio();
}
void SoundBoard::playEffect(int effect){
  //  std::cout << "playEffect called.\n";
    if(effect==0)
    Mix_PlayChannel( -1, dash, 0 );
    else if(effect==1)
    Mix_PlayChannel( -1, gravity, 0);
}
void SoundBoard::setMusic(int music){
    switch(music){
    default:
    	break;
    }
}
